#!/bin/bash

#启动tomcat8

/opt/tomcat8/bin/startup.sh

#等出现/opt/tomcat8/webapps/ROOT/WEB-INF/cgi/目录后替换

while [ ! -e "/opt/tomcat8/webapps/ROOT/WEB-INF/cgi/" ];do
   sleep 3
done

#根据数据库地址
sed -i "s/10.10.10.81/$MYSQL_ADDR/g"  /opt/tomcat8/webapps/ROOT/WEB-INF/cgi/*.sh

#保持脚本不退出

sleep 88888888888888



